package com.zcqk.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.zcqk.mapper.AccountMapper;
import com.zcqk.pojo.Account;
import com.zcqk.service.IAccountService;

@Service("accountService")
public class AccountServiceImpl implements IAccountService {
	@Autowired
	private AccountMapper accountMapper;

	@Override
	@Transactional(propagation=Propagation.REQUIRED)
	public boolean inserAccount(Account account) throws Exception {
		Integer a = accountMapper.addAccount(account);
		System.out.println(a);
		int i = 4 / 0;
		if (a > 0) {
			return true;
		}
		return false;
	}
}
